def weather(key,city,extensions='base',output=''):
    # 天气查询
    url='https://restapi.amap.com/v3/weather/weatherInfo?parameters'
    key='18ef7dd6aeefc21dade574262c00f213'
    city='440100'
    extensions='base'
    params={
        'key':key,
       'city':city,
        'extensions':extensions,
        'output':output
    }
    response=requests.get(url,params)
    r=response.json()
    return r